import Cookies from 'js-cookie'
import Basil from 'basil.js'
const TokenKey = 'Admin-Token'
const SiteId = 'site_id'
var basil = new window.Basil();
console.log(basil);
basil.options = {
    'namespace': 'foo',
    'storages': ['session'],
    'storage': 'session',
    'expireDays': 7
}
export function getToken() {
  // return Cookies.get(TokenKey)
  return basil.get(TokenKey)
}

export function setToken(token) {
    // return Cookies.set(TokenKey, token)
  return basil.set(TokenKey, token)
}

export function removeToken() {
    // return Cookies.remove(TokenKey)
  return basil.remove(TokenKey)
}

export function getSite() {
    // return Cookies.get(SiteId)
  return basil.get(SiteId)
}

export function setSite(siteid) {
    // return Cookies.set(SiteId, siteid)
  return basil.set(SiteId, siteid)
}

export function removeSite() {
    // return Cookies.remove(SiteId)
  return basil.remove(SiteId)
}

// export function getName() {
//   return Cookies.get(user_name)
// }
//
// export function setName(token) {
//   return Cookies.set(user_name, token)
// }
//
// export function removeName() {
//   return Cookies.remove(user_name)
// }
